const Editor = require('../../../src/index');
const Util = Editor.Util;
const dom = document.createElement('div');
const data = require('../../../demos/data/sample.json');
document.body.appendChild(dom);
describe('detailpanel test', () => {
  const editor = new Editor();
  const dom = Util.createDOM(`
    <div>
      <div id="page"></div>
      <div id="detailpanel">
        <div data-status="node-selected" class="panel">节点详情栏</div>
        <div data-status="edge-selected" class="panel">边详情栏</div>
        <div data-status="group-selected" class="panel">组详栏</div>
        <div data-status="canvas-selected" class="panel">画布详情栏</div>
        <div data-status="multi-selected" class="panel">多选详情栏</div>
      </div>
    </div>
  `);
  document.body.appendChild(dom);
  const detailpanel = new Editor.Detailpanel({
    container: 'detailpanel',
    width: 120,
    height: 120
  });
  const page = new Editor.Flow({
    graph: {
      container: 'page',
      height: 500,
      width: 500
    }
  });
  page.read(data);
  editor.add(page);
  editor.add(detailpanel);
  it('init', () => {
    editor.destroy();
    dom.destroy();
  });
});
